
#include <common.h>
#include <pcf50606.h>

/* initial register set for PCF50606 in HXD8 devices */
const u_int8_t pcf50606_initial_regs[__NUM_PCF50606_REGS] = {
	[PCF50606_REG_OOCS] 	= 0x00,
	/* gap */
	[PCF50606_REG_INT1M]	= PCF50606_INT1_SECOND,
	[PCF50606_REG_INT2M]	= PCF50606_INT2_CHGFOK |
				  PCF50606_INT2_CHGERR |
				  PCF50606_INT2_CHGFRDY |
				  PCF50606_INT2_CHGPROT |
				  PCF50606_INT2_CHGWD10S |
				  PCF50606_INT2_CHGWDEXP,
	[PCF50606_REG_INT3M]	= PCF50606_INT3_TSCPRES,
	[PCF50606_REG_OOCC1] 	= PCF50606_OOCC1_RTCWAK |
				  PCF50606_OOCC1_CHGWAK &
				  PCF50606_OOCC1_EXTONWAK_NO_WAKEUP,
	[PCF50606_REG_OOCC2]	= PCF50606_OOCC2_ONKEYDB_14ms |
				  PCF50606_OOCC2_EXTONDB_14ms,
	/* gap */
	[PCF50606_REG_PSSC]	= 0x00,
	[PCF50606_REG_PWROKM]	= 0x00,
	/* gap */
	[PCF50606_REG_DCDC1]	= 0xf0,	/* CORE_1V3: on */
	[PCF50606_REG_DCDC2]	= 0x00,
	[PCF50606_REG_DCDC3]	= 0x00,
	[PCF50606_REG_DCDC4]	= 0x30, /* 1.25A */

	[PCF50606_REG_DCDEC1]	= 0xe8, /* IO1_3V3: off */
	[PCF50606_REG_DCDEC2]	= 0x00,

	[PCF50606_REG_DCUDC1]	= 0x08, /* RF_3V3: off */
	[PCF50606_REG_DCUDC2]	= 0x30, /* 1.25A current limit */

	[PCF50606_REG_IOREGC]	= 0xf8, /* AUDIO_3V3: on */

	[PCF50606_REG_D1REGC1]	= 0xf8, /* RC_3V3: on */

	[PCF50606_REG_D2REGC1]	= 0x18, /* GPS_3V3: off */

	[PCF50606_REG_D3REGC1]	= 0xf8, /* IO2_3V3: off */

	[PCF50606_REG_LPREGC1]	= 0xf8, /* LCM_3V3: on */
	[PCF50606_REG_LPREGC2]	= 0x00,

	[PCF50606_REG_MBCC1]	= 0x00, /* charger unused */
	[PCF50606_REG_MBCC2]	= 0x00,	/* unlimited charging */
	[PCF50606_REG_MBCC3]	= 0x1a, /* 0.2*Ifast, 4.20V */
	[PCF50606_REG_BBCC]	= 0x1f, /* 400uA */
	[PCF50606_REG_ADCC1]	= 0x00,
	[PCF50606_REG_ADCC2]	= 0x00,
	/* gap */
	[PCF50606_REG_ACDC1]	= 0x00,
	[PCF50606_REG_BVMC]	= PCF50606_BVMC_THRSHLD_3V3,
	[PCF50606_REG_PWMC1]	= 0x1f,	/* clock: 512 DC: 15/16*/
	[PCF50606_REG_LEDC1]	= 0x00,
	[PCF50606_REG_LEDC2]	= 0x00,
	[PCF50606_REG_GPOC1]	= 0x03,	/* PWM ACTIVE */
	[PCF50606_REG_GPOC2]	= 0x07,	/* back light pull low */
	[PCF50606_REG_GPOC3]	= 0x00,
	[PCF50606_REG_GPOC4]	= 0x00,
	[PCF50606_REG_GPOC5]	= 0x00,
};


